package com.property.manage.dao.resource;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.property.manage.model.resource.Building;
import com.property.manage.model.resource.BuildingVo;
import com.property.manage.model.resource.ProBuildingVo;
import com.property.manage.model.system.User;
import com.property.manage.model.system.UserDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 描述
 *
 * @author lwb
 * @since 2020/7/15
 */
@Repository
public interface BuildingMapper extends BaseMapper<Building> {

    IPage<BuildingVo> getBuilding(@Param("page") IPage<BuildingVo> page,
                                  @Param("villageId") Integer villageId,
                                  @Param("building")Integer building,
                                  @Param("unit") Integer unit,
                                  @Param("roomNumber") String roomNumber);

    BuildingVo queryById( @Param("id")Integer id);

    Integer getBuildingTotal(@Param("villageId") Integer villageId);

    ProBuildingVo queryPreBuildingVo(@Param("id")Integer id);

    List<Integer> selectBuilding(@Param("villageId") Integer villageId);
    List<Integer> getBuildingId(@Param("building")Integer building,
                                @Param("unit") Integer unit,
                                @Param("roomNumber") String roomNumber);
    List<Integer> selectByVillageId(@Param("villageId") Integer villageId);
    List<Integer> selectId(@Param("villageId") Integer villageId,@Param("building") Integer building);
}
